package com.mgface.zookeeper.zkclient;

import java.util.List;

import org.I0Itec.zkclient.ZkClient;


public class DeleteNode {

	public static void main(String[] args) {
		ZkClient client = new ZkClient("127.0.0.1:2181", 10_000, 10_000);
		client.createPersistent("/zk/02", true);
		client.createPersistent("/zk/01/02", true);
		List<String> children = client.getChildren("/zk");
		System.out.println("删除前:"+children);
		boolean v = client.deleteRecursive("/zk");
		System.out.println("删除是否成功:"+v);
		List<String> children2 = client.getChildren("/");
		System.out.println("删除后:"+children2);
	}

}
